package Day33.list集合类;

import java.util.LinkedList;

public class LinkedListToStack {
    public static void main(String[] args) {
        //创建LinkedList集合
        LinkedList<String> stack = new LinkedList<>();
        //入栈
        stack.push("aaa");
        stack.push("bbb");
        stack.push("ccc");
        System.out.println(stack);
        System.out.println(stack.pop());

        String poll = stack.poll();
        System.out.println(poll);
        System.out.println(stack);
    }
}
